<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
#box { color:green; }
.red { color:red; }
.blue { color:blue; }
</style>
<script>
window.onload = function(){ 
	    var cssRules = document.styleSheets[0].cssRules || document.styleSheets[0].rules;
	    cssRules[2].style.color="#999";			//修改样式表中指定属性的值
}
</script>
</head>
<body>
<p class="blue">原为蓝色字体，现在显示为浅灰色。</p>
</body>
</html> 
